import request from "@/utils/request";

export function getDeviceList(data) {
  return request({
    url: "/iot/web/get/device/list",
    method: "post",
    data,
    repeat: true,
  });
}

export function sendTGcmd(data) {
  return request({
    url: "/iot/web/send/device/dim/cmd",
    method: "post",
    data,
  });
}

export function sendjxcmd(data) {
  return request({
    url: "/iot/web/send/device/ctl/cmd",
    method: "post",
    data,
  });
}

export function sendgccmd(data) {
  return request({
    url: "/iot/web/send/device/fac/cmd",
    method: "post",
    data,
  });
}

export function sendrestcmd(data) {
  return request({
    url: "/iot/web/send/device/reset/cmd",
    method: "post",
    data,
  });
}

export function getDeviceInfo(data) {
  return request({
    url: "/iot/web/get/device/state/info",
    method: "post",
    data,
    repeat: true,
  });
}

export function sendSearchcmd(data) {
  return request({
    url: "/iot/web/send/device/info/cmd",
    method: "post",
    data,
  });
}

export function getDeviceInfoHY(data) {
  return request({
    url: "/iot/web/get/device/hy/info",
    method: "post",
    data,
  });
}

export function addOtaFile(data) {
  return request({
    url: "/iot/manager/ota/file/add",
    method: "post",
    data,
  });
}

export function edittaFile(data) {
  return request({
    url: "/iot/manager/ota/file/update",
    method: "post",
    data,
  });
}

export function getOtaList(data) {
  return request({
    url: "/iot/manager/get/ota/list",
    method: "post",
    data,
  });
}

export function editOtaFile(data) {
  return request({
    url: "/iot/manager/ota/file/update",
    method: "post",
    data,
  });
}

export function downUpOtaFile(data) {
  return request({
    url: "/iot/manager/ota/file/up/down",
    method: "post",
    data,
  });
}

export function delOtaFile(data) {
  return request({
    url: "/iot/manager/ota/file/del",
    method: "post",
    data,
  });
}

export function trajectory(data) {
  return request({
    url: "/iot/web/get/trajectory/list",
    method: "post",
    data,
  });
}

export function getDeviceModels(data) {
  return request({
    url: "/iot/web/get/models",
    method: "post",
    data,
  });
}

export function sendChannelCmd(data) {
  return request({
    url: "/iot/web/send/device/channel/cmd",
    method: "post",
    data,
  });
}
